<!--
 * @Description: 其他收付款类型
 * @Author: QinTianyu
 * @Date: 2020-05-07 09:25:45
 * @LastEditors: QinTianyu
 * @LastEditTime: 2020-05-07 09:46:11
 -->

<div class="page-toolbar">

    <div class="layui-btn-group fl">
        <a href="{:url('add')}" class="layui-btn layui-btn-primary layui-icon layui-icon-add-circle-fine hisi-iframe-pop">&nbsp;新增</a>
        <!-- <a data-href="{:url('status?val=1')}" class="layui-btn layui-btn-primary j-page-btns layui-icon layui-icon-play" data-table="dataTable">&nbsp;启用</a>
        <a data-href="{:url('status?val=0')}" class="layui-btn layui-btn-primary j-page-btns layui-icon layui-icon-pause" data-table="dataTable">&nbsp;禁用</a>
        <a data-href="{:url('del')}" class="layui-btn layui-btn-primary j-page-btns confirm layui-icon layui-icon-close red">&nbsp;删除</a> -->
    </div> 
</div>
<table id="dataTable"></table>
{include file="system@block/layui" /}
<script type="text/html" id="statusTpl">
    {{# if(d.id != 0){  }}
    <input type="checkbox" name="status" value="{{ d.status }}" lay-skin="switch" lay-filter="switchStatus" lay-text="正常|关闭" {{ d.status == 1 ? 'checked' : '' }} data-href="{:url('status')}?id={{ d.id }}">
    {{# } }}
</script>
<script type="text/html" title="操作按钮模板" id="buttonTpl">
    {{# if(d.id != 0){  }}
    <a href="{:url('edit')}?id={{ d.id }}" class="layui-btn layui-btn-xs layui-btn-normal hisi-iframe-pop">修改</a>
    <a href="{:url('del')}?id={{ d.id }}" class="layui-btn layui-btn-xs layui-btn-danger j-tr-del">删除</a>

    {{# } }}
</script>
<script type="text/javascript">
    layui.use(['table','jquery','excel'], function() {
        var table = layui.table;
        var $ = layui.jquery;
 
        table.render({
            elem: '#dataTable'
            ,url: '{:url("")}' //数据接口
            ,page: true //开启分页
            ,skin: 'row'
            ,even: true
            ,limit: 20
            ,text: {
                none : '暂无相关数据'
            }
            ,cols: [[ //表头
                {type:'checkbox'}
                ,{field: 'id', title: '编号 '}
                ,{field: 'name', title: '级别名称'}
                // ,{field: 'createtime', title: '添加时间'}
            ]]
        });
    });
</script>
